Move the logic to find the Xen Python scripts above the import statements.
authoremellor@leeni.uk.xensource.com <emellor@leeni.uk.xensource.com>
Sat, 6 May 2006 14:42:12 +0000 (15:42 +0100)
committeremellor@leeni.uk.xensource.com <emellor@leeni.uk.xensource.com>
Sat, 6 May 2006 14:42:12 +0000 (15:42 +0100)
Signed-off-by: Ewan Mellor <ewan@xensource.com>
tools/xm-test/lib/XmTestLib/__init__.py

index 71273830672b68ee4a5e22c857caefed11f91e85..f638003b08f3e41aa5e4e3941b05af7cc0500594 100644 (file)
@@ -3,13 +3,8 @@
 # Author: Dan Smith <danms@us.ibm.com>
 #
 
-from Console import *
-from Test import *
-from Xm import *
-from XenDomain import *
-from config import *
-from XenDevice import *
-from NetConfig import *
+import os.path
+import sys
 
 # Use the auxbin module in Xend to determine the correct Python path.  We
 # take the first installed instance of auxbin that we find, and then run it
@@ -28,6 +23,14 @@ for p in ['python%s' % sys.version[:3], 'python']:
             sys.path.append(libpath)
             break
 
+from Console import *
+from Test import *
+from Xm import *
+from XenDomain import *
+from config import *
+from XenDevice import *
+from NetConfig import *
+
 # Give this test a clean slate
 destroyAllDomUs()